﻿using System.Web;

namespace Songhay.Web.Mvc.Extensions
{
    /// <summary>
    /// Extension methods for <see cref="System.Web.HttpServerUtilityBase"/>.
    /// </summary>
    public static class HttpServerUtilityBaseExtensions
    {
        /// <summary>
        /// Determines whether the server is of the specified name.
        /// </summary>
        /// <param name="server">The server.</param>
        /// <param name="serverName">Name of the server.</param>
        /// <returns>
        /// 	<c>true</c> if the specified server is local; otherwise, <c>false</c>.
        /// </returns>
        public static bool IsServer(this HttpServerUtilityBase server, string serverName)
        {
            return server.MachineName.ToLower().Equals(serverName);
        }
    }
}